package com.tudouji.project.mt.http.request;

import com.google.gson.reflect.TypeToken;
import com.meituan.sdk.MeituanRequest;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.annotations.ApiMeta;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.tudouji.project.mt.http.response.PoiStockOutListResponse;
import lombok.Data;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * 门店_根据单据号查询配送中心出库单明细列表
 */
@ApiMeta(
        path = "/rms/scmplus/inventory/api/v1/poi/stockOut/list",
        businessId = 18,
        apiVersion = "",
        apiName = "",
        needAuth = true
)
@Data
public class PoiStockOutListRequest implements MeituanRequest<PoiStockOutListResponse> {

    //机构ID
    private Long orgId;

    //单据号列表
    private ArrayList<String> itemSns;

    @Override
    public MeituanResponse<PoiStockOutListResponse> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<PoiStockOutListResponse>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }
}
